package com.tuanzi.loan.web.lazy.settlement;

import com.tuanzi.loan.business.service.settlement.FirstpartyDataChangeRecordService;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.settlement.FirstpartyDataChangeRecordRequest;
import com.tuanzi.loan.vo.response.settlement.FirstpartyDataChangeRecordResponse;
import com.tuanzi.loan.web.bean.CurrentUserBean;
import com.tuanzi.loan.web.lazy.LazyDataSessionModel;
import org.springframework.data.domain.Page;

/**
 * @author caiwanlin
 * @create 2018-01-18 10:56
 */
public class FirstpartyDataLazyDataModel extends LazyDataSessionModel<FirstpartyDataChangeRecordRequest,FirstpartyDataChangeRecordResponse> {

    private FirstpartyDataChangeRecordService firstpartyDataChangeRecordService;

    public FirstpartyDataLazyDataModel(FirstpartyDataChangeRecordRequest firstpartyDataChangeRecordRequest, CurrentUserBean session, FirstpartyDataChangeRecordService firstpartyDataChangeRecordService) {
        super(firstpartyDataChangeRecordRequest, session);
        this.firstpartyDataChangeRecordService = firstpartyDataChangeRecordService;
    }

    @Override
    protected Page<FirstpartyDataChangeRecordResponse> doLoad0(PageSearcher<FirstpartyDataChangeRecordRequest> pageSearcher) {
        return firstpartyDataChangeRecordService.list(pageSearcher);
    }
}
